package com.qianli.cashmama.trade.client.bill.request;

import com.fqgj.common.api.ParamsObject;
import com.fqgj.common.utils.StringUtils;
import com.fqgj.exception.common.ApplicationException;

/**
 * 账单待还款金额查询
 * Created with IntelliJ IDEA.
 * User: pavan
 * Date: 2020/4/13
 * Time: 下午5:25
 */
public class RepaymentQueryRequest extends ParamsObject {

    /**
     * 订单号
     */
    private String tradeNo;
    /**
     * 账单号
     */
    private String billNo;

    public String getTradeNo() {
        return tradeNo;
    }

    public RepaymentQueryRequest setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
        return this;
    }

    public String getBillNo() {
        return billNo;
    }

    public RepaymentQueryRequest setBillNo(String billNo) {
        this.billNo = billNo;
        return this;
    }

    @Override
    public void validate() {
        if (StringUtils.isEmpty(tradeNo) && StringUtils.isEmpty(billNo)) {
            throw new ApplicationException("Parameter error");
        }
    }
}
